using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Globalization;

public partial class GlobalizationDemo : NBear.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            for (int i = 0; i < DropDownList1.Items.Count; i++)
            {
                ListItem item = DropDownList1.Items[i];
                if (item.Value.ToLower() == NBear.Web.UI.WebHelper.DefaultCulture.ToString().ToLower())
                {
                    DropDownList1.SelectedIndex = i;
                }
            }
        }
    }

    protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
    {
        NBear.Web.UI.WebHelper.DefaultCulture = new CultureInfo(DropDownList1.SelectedValue);
        NBear.Web.UI.WebHelper.LoadResources("Strings");
    }
}
